<%@page import="org.apache.commons.fileupload.RequestContext"%>
<%@page import="com.system.uitls.CommonUtil"%>
<%@page import="com.system.dao.ApproveDao" %>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ include file="../common.jsp" %>
<%
	String id = (String)request.getParameter("id");
	ApproveDao dao = new ApproveDao();
	Map<String, String> map = dao.getApproveParms(id);
	String create_time = map.get("create_time");
	String approve_result = map.get("approve_result");
	String approve_opinion = map.get("approve_opinion");
	pageContext.setAttribute("create_time", create_time);
	pageContext.setAttribute("approve_result", approve_result);
	pageContext.setAttribute("approve_opinion", approve_opinion);
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <title>审批</title>
  </head>
  <body style="overflow:hidden">
  	<form id="winForm">
  		<input name="id" type="hidden" value="${param.id}"> 
		<table border="0" cellpadding="0" cellspacing="0" style="margin-left: 10px;margin-top: 10px;">
			<tr height="40px">
				<td width="80px" align="right">审批人：</td>
				<td width=""><input id="name" name="name" type="text" class="textbox" style="width: 140px;color: blue;" value="${currentUserName }" readonly/></td>
				<td width="" align="right">审批时间：</td>
				<td width=""><input name="create_time" type="text" class="textbox" style="width: 140px;color: blue;" value="${create_time}" readonly/></td>
			</tr>
			<tr height="30px">
				<td width="80px" align="right"><span style="color: red;">*</span>审批结果：</td>
				<td width="" colspan="2">
					<c:choose>
						<c:when test='<%= "0".equals(pageContext.getAttribute("approve_result",PageContext.PAGE_SCOPE)) %>'>
							<input id="name" name="name" type="text" class="textbox" style="width: 140px;color: blue;" value="不通过" readonly/>
						</c:when>
						<c:otherwise>
							<input id="name" name="name" type="text" class="textbox" style="width: 140px;color: blue;" value="通过" readonly/>
						</c:otherwise>
					</c:choose>
				</td>
			</tr>
			<tr height="40px" style="margin-top: 10px">
				<td width="80px" align="right" valign="top">审批意见：</td>
				<td colspan="3">
					<textarea name="approve_opinion" rows="8" cols="46" readonly="readonly" style="color: blue;">${approve_opinion}</textarea>
				</td>
			</tr>
	  	</table>
  	</form>
  </body>
</html>
